@import '../../../../variables';

$weird-task-list-f: 5px;

:host {
  display: block;
}

.improvements {
  padding-top: 4px;
  padding-bottom: 16px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  margin: -4px;
  white-space: nowrap;
  justify-content: center;

  @include mq(xs) {
    padding-bottom: 30px;
  }
}

.improvement {
  align-items: center;
  border-radius: 16px;
  user-select: none;
  -webkit-user-select: none; /* Safari */
  display: flex;
  font-weight: 500;
  font-size: 14px;
  height: 32px;
  margin: 4px;
  min-height: 32px;
  position: relative;
  padding: 7px 0;
  overflow: hidden;
  transition: $transition-fast;
  background: transparent;

  @include lightTheme() {
    border: 1px solid #333;
    //background-color: rgba(var(--palette-background-unselected-chip), 1);
    color: rgba(var(--palette-foreground-text), var(--palette-foreground-text-alpha, 1));
    // this would be the bookmark button border
    //border-color: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.33);
  }

  @include darkTheme() {
    border: 1px solid;
    color: #fff;
    // this would be the bookmark button border
    //border-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.33);
  }

  &:active {
    box-shadow: $whiteframe-shadow-2dp;
  }

  .title {
    transition: inherit;
    max-width: 300px;
    height: 32px;
    line-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  button {
    transition: inherit;
    opacity: 0;
    transform: scale(0.1);
    position: relative;
    z-index: 1;
    transform-origin: center center;

    @include lightTheme() {
      color: rgba(
        var(--palette-foreground-text),
        var(--palette-foreground-text-alpha, 1)
      );
    }
    @include darkTheme() {
      color: white;
    }

    &.dismiss {
      transform: translateX(-11px);
      margin-right: -12px;
    }

    &.check {
      transform: translateX(11px);
      margin-left: -12px;
    }

    mat-icon {
      font-size: 22px;
      max-height: 32px;
    }
  }

  &:hover {
    button {
      opacity: 0.4;
      transform: scale(1);

      &:hover {
        opacity: 1;
      }
    }

    .title {
      transform-origin: center center;
      transform: scaleX(0.857142857142857);
    }
  }

  .hover {
    display: none;
    position: absolute;
    right: 100%;
  }
}
